#ifndef PPTPREQUESTHANDLER_H
#define PPTPREQUESTHANDLER_H

#include <QObject>
#include "PptpMessage.h"
#include "service/ProductService.h"
#include "service/UserService.h"
#include "service/AddressBookService.h"
#include "service/OrderService.h"
#include "service/MessageService.h"
#include "entity/UserInfo.h"
#include "entity/Address.h"
#include "entity/Product.h"

class PptpRequestHandler : public QObject
{
    Q_OBJECT
public:
    explicit PptpRequestHandler(QObject *parent = nullptr);
    QByteArray userLogin(const PptpMessage &pptpRequest);
    QByteArray userRegister(const PptpMessage &pptpRequest);
    QByteArray userEditUserInfo(const PptpMessage &pptpRequest);
    QByteArray userGetUserInfo(const PptpMessage &pptpRequest);
    QByteArray userSetAvatar(const PptpMessage &pptpRequest);
    QByteArray userGetAvatar(const PptpMessage &pptpRequest);
    QByteArray userAddAddress(const PptpMessage &pptpRequest);
    QByteArray userGetAddressBook(const PptpMessage &pptpRequest);
    QByteArray userEditAddress(const PptpMessage &pptpRequest);
    QByteArray userDeleteAddress(const PptpMessage &pptpRequest);
    QByteArray productGetProducts(const PptpMessage &pptpRequest);
    QByteArray orderProductBuy(const PptpMessage &pptpRequest);
    QByteArray orderOrderList(const PptpMessage &pptpRequest);
    QByteArray productGetProductsById(const PptpMessage &pptpRequest);

private:
    ProductService productService;
    UserService userService;
    AddressBookService addressBookService;
    OrderService orderService;
    MessageService messageService;

signals:
};

#endif // PPTPREQUESTHANDLER_H
